Skip to content

feat: rMPP support#58

Merged
Eeems merged 16 commits into
toltec-dev:mainfrom
NoaHimesaka1873:main
Oct 29, 2025
Merged

feat: rMPP support#58
Eeems merged 16 commits into
toltec-dev:mainfrom
NoaHimesaka1873:main

Conversation

@NoaHimesaka1873

Copy link
Copy Markdown
Contributor

No description provided.

@NoaHimesaka1873 NoaHimesaka1873 marked this pull request as draft May 1, 2025 15:44
Comment thread toltec/builder.py Outdated
@NoaHimesaka1873 NoaHimesaka1873 marked this pull request as ready for review May 2, 2025 15:03
Comment thread toltec/builder.py Outdated
Comment thread toltec/builder.py Outdated
Comment thread docs/recipe-format.md Outdated
Comment thread docs/recipe-format.md Outdated
Comment thread docs/recipe-format.md Outdated
@Eeems

Eeems commented Oct 26, 2025

Copy link
Copy Markdown
Member

@NoaHimesaka1873 there are merge conflicts, could you resolve them?

To further help things, could you add a test that just compiles a very simple hello world c program as part of creating the package, and then ensure that it creates an executable with the correct architecture after doing a build? This would be the test I would be doing manually otherwise. I'm guessing this is still waiting on toltec-dev/toolchain#41 though?

@NoaHimesaka1873

Copy link
Copy Markdown
Contributor Author

Yeah I could make one, though it would need v4 to be merged first.

@Eeems

Eeems commented Oct 27, 2025

Copy link
Copy Markdown
Member

You would be able to do the test locally by downloading the v4 images from the v4 PR pipeline before they are removed, but yes, it would require it being merged before this can be fully tested.

@Eeems Eeems linked an issue Oct 27, 2025 that may be closed by this pull request
@Eeems

Eeems commented Oct 27, 2025

Copy link
Copy Markdown
Member

While testing toltec-dev/toolchain#41 I was using the following recipe for testing:

#!/usr/bin/env bash
# Copyright (c) 2020 The Toltec Contributors
# SPDX-License-Identifier: MIT

archs=(arm aarch64)
pkgnames=(hello)
pkgdesc="Hello world"
url=https://toltec-dev.org
pkgver=0.0.0-1
timestamp=2025-10-27T18:32:23Z
section=utils
maintainer="Nathaniel van Diepen <eeems@eeems.email>"
license=MIT
image=toolchain:v4.0
source=(hello.c)
sha256sums=(SKIP)
flags=(nostrip)

build() {
    source /opt/x-tools/switch-$arch.sh
    ${CROSS_COMPILE}gcc hello.c -o hello
    ${CROSS_COMPILE}strip hello
}

package() {
    install -D -m 755 "$srcdir"/hello "$pkgdir"/opt/bin/hello
}

With the following source file:

#include <stdio.h>

int main(){
   printf("Hello, World!");
   return 0;
}

This would need to be update to use the correct archs etc.

Now that I'm playing with this and looked at #57 I'm realizing that there is still an issue that will make implementing this in the actual repo difficult. There is no way to specify a different image per arch, and since v4.0 is not compatible with the current supported 3.x images that rmallos3, rm1os3, and rm2os3 target, this means that you can't target them at the same time as rmppos3 for packages that need to compile anything. The options I see for merging this are:

  1. Add mechanism to change image based on arch.
  2. Create new arch set for things built with v4+ images. rmallos3v18 or something similar, and we'll have to work on creating duplicate package recopies for packages as we implement the new OS support.

@Eeems

Eeems commented Oct 27, 2025

Copy link
Copy Markdown
Member

Please also add rmppm, even though it'll be the same as rmpp, but it allow for packages to target just one specifically. Although this means we'll need a rmall equivalent for just rmpp and rmppm. It may make sense to have a rmarm and rmaarch?

Comment thread toltec/builder.py Outdated
@NoaHimesaka1873

Copy link
Copy Markdown
Contributor Author

Wrote test case!

@NoaHimesaka1873 NoaHimesaka1873 requested a review from Eeems October 28, 2025 04:42
@Eeems

Eeems commented Oct 28, 2025

Copy link
Copy Markdown
Member

You'll want to run make format-fix and then resolve any make lint errors.

@NoaHimesaka1873

Copy link
Copy Markdown
Contributor Author

builder.py line 333 still remains over 80 characters, gotta fix manually...

@NoaHimesaka1873

Copy link
Copy Markdown
Contributor Author

I chose more variables over super long lines.

@NoaHimesaka1873

Copy link
Copy Markdown
Contributor Author

Urgh, should be now actually fixed

Comment thread docs/recipe-format.md Outdated
@Eeems

Eeems commented Oct 28, 2025

Copy link
Copy Markdown
Member

I'll merge this tomorrow, but I'm not going to tag 0.4 yet, I've got to sort out the concern I raised at the bottom of #58 (comment)

I'd really like to allow custom images per arch. I may also implement #43

@Eeems Eeems self-requested a review October 28, 2025 23:53
@Eeems Eeems merged commit 644d204 into toltec-dev:main Oct 29, 2025
14 checks passed
@Eeems

Eeems commented Oct 29, 2025

Copy link
Copy Markdown
Member

Upon reviewing the code, my concern about different image per arch not being possible is not true, you can specify image_rmpp= to use a specific build image for the rmpp package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiarch support

2 participants